package com.ziyueyuwen.xiniao.service;

import com.ziyueyuwen.xiniao.bean.question.PointDO;
import com.ziyueyuwen.xiniao.bean.question.PointSelectBean;
import com.ziyueyuwen.xiniao.bean.question.ZyQuestionPoint;

import java.util.List;
import java.util.Set;

/**
 * @author wancheng  on 2019/1/9.
 */
public interface PointService {
    /**
     * 添加
     * @param point
     * @return
     */
    ZyQuestionPoint insert(ZyQuestionPoint point);

    /**
     * 修改
     * @param point
     * @return
     */
    ZyQuestionPoint update(ZyQuestionPoint point);

    /**
     * 删除
     * @param pointId
     */
    void delete(Integer pointId);

    /**
     * 获取子知识点
     * @param parentId
     * @return
     */
    List<ZyQuestionPoint> getPoint(Integer parentId);

    /**
     * 知识点
     * @return
     */
    List<PointSelectBean> getPointSelectBean();

    /**
     * 通过父知识点获取
     * @param pointId
     * @return
     */
    Set<Integer> getPointParentIds(Integer pointId);

    /**
     * 通过父知识点获取
     * @param points
     * @return
     */
    Set<Integer> getPointParentIds(Set<Integer> points);
}
